home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / SegLoad.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  2.6 KB  |  110 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        SegLoad.a
  3. ;
  4. ;    Contains:    Segment Loader Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1985-1993, 1995-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__SEGLOAD__') = 'UNDEFINED' THEN
  18. __SEGLOAD__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.  
  24.     IF TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  25.  
  26. ;   CountAppFiles, GetAppFiles, ClrAppFiles, GetAppParms, getappparms, 
  27. ;   and the AppFile data structure and enums are obsolete. 
  28. ;   They are still supported for writing old style 68K apps, 
  29. ;   but they are not supported for CFM-based apps.
  30. ;   Use AppleEvents to determine which files are to be 
  31. ;   opened or printed from the Finder.
  32.  
  33.  
  34.  
  35. appOpen                            EQU        0                    ;Open the Document (s)
  36. appPrint                        EQU        1                    ;Print the Document (s)
  37. AppFile                    RECORD 0
  38. vRefNum                     ds.w    1                ; offset: $0 (0)
  39. fType                     ds.l    1                ; offset: $2 (2)
  40. versNum                     ds.w    1                ; offset: $6 (6)        ; versNum in high byte
  41. fName                     ds        Str255            ; offset: $8 (8)
  42. sizeof                     EQU *                    ; size:   $108 (264)
  43.                         ENDR
  44. ;
  45. ; pascal void CountAppFiles(short *message, short *count)
  46. ;
  47.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  48.         IMPORT_CFM_FUNCTION CountAppFiles
  49.     ENDIF
  50.  
  51. ;
  52. ; pascal void GetAppFiles(short index, AppFile *theFile)
  53. ;
  54.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  55.         IMPORT_CFM_FUNCTION GetAppFiles
  56.     ENDIF
  57.  
  58. ;
  59. ; pascal void ClrAppFiles(short index)
  60. ;
  61.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  62.         IMPORT_CFM_FUNCTION ClrAppFiles
  63.     ENDIF
  64.  
  65. ;
  66. ; pascal void GetAppParms(Str255 apName, short *apRefNum, Handle *apParam)
  67. ;
  68.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  69.         _GetAppParms:    OPWORD    $A9F5
  70.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  71.         IMPORT_CFM_FUNCTION GetAppParms
  72.     ENDIF
  73.  
  74.     ENDIF
  75.  
  76. ;   Because PowerPC applications don’t have segments.
  77. ;   But, in order to allow applications to not have conditionalized
  78. ;   source code, UnloadSeg is macro'ed away for PowerPC.
  79.  
  80.  
  81.     IF TARGET_CPU_68K THEN
  82. ;
  83. ; pascal void UnloadSeg(void *routineAddr)
  84. ;
  85.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  86.         _UnloadSeg:    OPWORD    $A9F1
  87.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  88.         IMPORT_CFM_FUNCTION UnloadSeg
  89.     ENDIF
  90.  
  91.     ENDIF    ; TARGET_CPU_68K
  92.  
  93.  
  94.  
  95.     IF OLDROUTINELOCATIONS THEN
  96. ;
  97. ; pascal void ExitToShell(void )
  98. ;
  99.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  100.         _ExitToShell:    OPWORD    $A9F4
  101.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  102.         IMPORT_CFM_FUNCTION ExitToShell
  103.     ENDIF
  104.  
  105.     ENDIF    ; OLDROUTINELOCATIONS
  106.  
  107.  
  108.     ENDIF ; __SEGLOAD__ 
  109.  
  110.